package com.wondersgroup.restbase.service.impl;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.wondersgroup.restbase.service.AbstractBaseService;
import com.wondersgroup.restbase.service.DefaultService;

/**
 * 默认服务实现具体类
 * @author wondersgroup
 *
 * @param <T> 业务类型参数
 */
@Service("defaultServiceImpl")
@Scope("prototype")
public class DefaultServiceImpl<T> extends AbstractBaseService<T> implements DefaultService<T>{
	
	private Class<T> clazz;
	
	@Override
	public void initModelClass(Class<T> clazz) {
		// TODO Auto-generated method stub
		this.setClazz(clazz);
	}
	
	@Override
	protected Class<T> getModelClass() {
		// TODO Auto-generated method stub
		return getClazz();
	}

	private Class<T> getClazz() {
		return clazz;
	}

	private void setClazz(Class<T> clazz) {
		this.clazz = clazz;
	}

}
